package program;

import model.util.HibernateUtil;

import org.hibernate.Session;
import org.hibernate.SessionFactory;

public class programMain {

	public static void main(String[] args) {

		SessionFactory sessionFactory = null;
		Session session = null;
		try {
			sessionFactory = HibernateUtil.getSessionFactory();
			session = sessionFactory.openSession();
			session.beginTransaction();
			session.getTransaction().commit();
		} catch (Exception e) {
			if (session != null)
				session.getTransaction().rollback();
			e.printStackTrace();
		} finally {
			if (session != null)
				session.close();
		}
	}
}
